package stationGUI;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JTextPane;
//import javax.swing.JSplitPane;
import javax.swing.JSplitPane;

public class Station {
  private static final String FRAME_TITLE="Station";
  public static final Color BACKGROUND_COLOR = Color.WHITE;
  
  
  
  public ColorChooserScreen color;
  public NeighborhoodScreen neighborhood;
  public ProgressPanel progress;
  
  /**
   * @param args
   */
  public Station(ClientNode n) {
    
    color = new ColorChooserScreen(n);
    neighborhood = new NeighborhoodScreen(n);
    progress = new ProgressPanel(n);
    n.progress=progress;
    
    
    JSplitPane right = new JSplitPane(JSplitPane.VERTICAL_SPLIT,neighborhood,progress);
    JSplitPane main = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,color,right);
    main.setBackground(BACKGROUND_COLOR);
    right.setBackground(BACKGROUND_COLOR);
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    //ColorChooserCompositeScreen a=new ColorChooserCompositeScreen(n);
    
    
    
    
    
    
    
    
    
    
    
    
  //public static void main(String[] args) {
    /*JFrame frame=new JFrame(FRAME_TITLE);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.add(new ColorScreen());
    //frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    frame.setSize(400,400);
    frame.setVisible(true);
    
    JFrame frame2=new JFrame(FRAME_TITLE);
    frame2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame2.add(new ColorBubble());
    //frame2.setExtendedState(JFrame.MAXIMIZED_BOTH);
    frame2.setSize(400,400);
    frame2.setVisible(true);
    */
    //Node node = new Node(c);
    //main.addPropertyChangeListener();
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    Dimension screenSize = toolkit.getScreenSize();
    main.setDividerLocation(screenSize.width-screenSize.height);
    right.setDividerLocation(screenSize.height-200);
    
    //JSplitPane right = new JSplitPane(JSplitPane.VERTICAL_SPLIT,new ChatScreen(),new ColorBubble());

    JFrame frame=new JFrame(FRAME_TITLE);
    frame.setLayout(new BorderLayout());
    //frame.add(BorderLayout.WEST,new ColorScreen());
    //frame.add(new ChatScreen());


    //frame.add(new NeighborhoodScreen(node));
    //frame.add(new PaintingAndStroking());
    frame.add(main);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //frame.add(new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,left,right));
    //frame.setResizable(false);
    //frame.setSize(400,400);
    frame.setVisible(true);
    
    
    
    //frame.setSize(800,400);
    frame.setSize(screenSize);
    frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
    
    JTextPane p=new JTextPane();
    //a.add(p);
    p.setText("thaitea aed jaosigj ioas doia sdgoiaosidg oiad goiasj dgo jasg so goia gosn dgo nsaod gosn goisn goisn dogn sodgn iosn goisa ndgosn gion siogn ason oiasndgoasn gansg osa gs gposa goi ansogd iosdg pasdgs gpas ndgpoas gopsa gops dgoi asdoip ast");
    
    
    //JDialog d=new JDialog(frame);
    //d.getContentPane().add(new ChatScreen());
   // d.setSize(400,300);
   // d.setVisible(true);
    
    
  }

}
